﻿using System;
using System.Html.DOM;

namespace Mojo
{
    public class StageController
    {
        public AppController GetAppController()
        {
            return null;
        }

        /// <summary>
        /// Returns true if the stage is both active and has currently pushed.
        /// </summary>
        /// <returns></returns>
        public bool IsActiveAndHasScenes()
        {
            return false;
        }

        public void Activate()
        {

        }

        public void Deactivate()
        {

        }

        public bool IsChildWindow()
        {
            return false;
        }

        /// <summary>
        /// returns true if the current stage has new content for the indicator, and false otherwise.
        /// </summary>
        /// <returns></returns>
        public bool HasNewContent()
        {
            return false;
        }

        /// <summary>
        /// Change properties of the window.
        /// </summary>
        /// <param name="props">
        /// Possible values include:         
        /// blockScreenTimeout: Boolean.  If true, the screen will not dim or turn off in the absence of user activity.  If false, the timeout behavior will be reinstated.
        /// setSubtleLightbar: Boolean.  If true, the light bar will be made somewhat dimmer than normal.  If false, it will return to normal.
        /// fastAccelerometer: Boolean.  If true, the accelerometer rate will increase to 30 hz; false by default, rate is at 4 hz. Note fast rate is active only for apps when maximized.
        /// </param>
        public void SetWindowProperties(object props)
        {
        }

        /// <summary>
        /// Makes the core navi button pulsate if true. This is mainly intended to alert the user to dashboard events that desire user attention.
        /// </summary>
        /// <param name="hasNew"></param>
        public void IndicateNewContent(bool hasNew)
        {
        }

        public void SendEventToCommanders(Event events)
        {

        }

        /// <summary>
        /// Adds the given commander to the top of this StageController's stack. The commanders in this stack are only used when this scene is the current scene.
        /// </summary>
        /// <param name="cmdr"></param>
        public void PushCommander(object cmdr)
        {

        }

        /// <summary>
        /// Removes a commander from the commander stack.
        /// </summary>
        /// <param name="cmdr"></param>
        public void removeCommander(object cmdr)
        {

        }

        /// <summary>
        /// Return the topmost scene from this stage.
        /// </summary>
        /// <returns></returns>
        public SceneController TopScene()
        {
            return null;
        }

        /// <summary>
        /// Return the currently active scene from this stage, if any. If no scenes are active, returns undefined.
        /// </summary>
        /// <returns></returns>
        public SceneController ActiveScene()
        {
            return null;
        }

        /// <summary>
        /// Sets the orientation of the stage's window.
        /// </summary>
        /// <param name="orientation">orientation One of 'up', 'down', 'left', 'right', or 'free'</param>
        public void SetWindowOrientation(string orientation)
        {

        }

        /// <summary>
        /// Gets the orientation of the stage's window.
        /// </summary>
        /// <returns>One of 'up', 'down', 'left' or 'right'</returns>
        public string GetWindowOrientation()
        {
            return null;
        }

        /// <summary>
        /// Loads a stylesheet -- and any versions of it for the current locale -- into the stage's document.
        /// </summary>
        /// <param name="path">path A path relative to the application's root directory specifying the stylesheet to load.</param>
        public void LoadStylesheet(string path)
        {
        }

        /// <summary>
        /// Unloads a stylesheet -- and any versions of it for the current locale -- from the stage's document.
        /// </summary>
        /// <param name="path">path A path relative to the application's root directory specifying the stylesheet to unload.</param>
        public void UnloadStylesheet(string path)
        {
        }

        public SceneController[] GetScenes()
        {
            return null;
        }

        /// <summary>
        /// Push a new scene; the Scene Lifecycle initial setup includes this function.
        /// </summary>
        /// <param name="sceneArguments">
        /// an object with these properties:
        ///		{ name, assistantConstructor, sceneTemplate, [id] }
        ///		Note that all additional arguments are passed to the constructor of the next scene's assistant.
        ///		since 1.4 sceneArguments allows for template substitution on the new scene's html via a templateModel property. This is passed as 'object' to Mojo.View.render.
        ///	</param>
        public void PushScene(object sceneArguments)
        {
        }

        /// <summary>
        /// Push a new scene; the Scene Lifecycle initial setup includes this function.
        /// </summary>
        /// <param name="scene">the name of the scene to push</param>
        public void PushScene(string scene)
        {
        }

        /// <summary>
        /// Pops the current scene and simultaneously pushed a new scene without 
        /// activating & deactivating any underlying scenes.
        /// Note that this is an asynchronous operation.
        /// </summary>
        /// <param name="scene">
        /// an object with these properties:
        ///		{ name, assistantConstructor, sceneTemplate, [id] }
        ///		Note that all additional arguments are passed to the constructor of the next scene's assistant.
        ///		since 1.4 sceneArguments allows for template substitution on the new scene's html via a templateModel property. This is passed as 'object' to Mojo.View.render.
        /// </param>
        public void SwapScene(object sceneArguments)
        {

        }

        /// <summary>
        /// Pops the current scene and simultaneously pushed a new scene without 
        /// activating & deactivating any underlying scenes.
        /// Note that this is an asynchronous operation.
        /// </summary>
        /// <param name="scene">the name of the scene to push</param>
        public void SwapScene(string scene)
        {

        }

        /// <summary>
        /// Removes a scene from the scene stack, passing the return value
        /// to the newly revealed scene's activate method.
        /// Note that this is an asynchronous operation.
        /// </summary>
        /// <param name="returnValue">returnValue Value passed to the next scene active method</param>
        /// <param name="options">
        /// Optional object that can specify:
        /// 		{
        ///			    transition: Mojo.Transition.xxx
        /// 		}
        /// </param>
        public void PopScene(object returnValue, object options)
        {

        }
        
        /// <summary>
        /// Removes scenes from the scene stack until the target scene is reached, or there are no scenes remaining on the stack.        
        /// Intermediate popped scenes are *not* reactivated, nor is there any visual transition to signify their removal from the stack.
        /// Note that this is an asynchronous operation.
        /// </summary>
        /// <param name="targetScene">
        /// targetScene may be either the SceneController for the desired scene, the scene DOM ID, or the scene name.
        ///     If targetScene is undefined, all scenes will be popped.
        /// </param>
        /// <param name="returnValue">returnValue Value passed to the next scene active method</param>
        /// <param name="options">
        /// Optional object that can specify:
        /// 		{
        ///			    transition: Mojo.Transition.xxx
        /// 		}
        /// </param>
        public void PopScenesTo(object targetScene, object returnValue, object options)
        {
        }

        public HtmlElement Get(string elementId)
        {
            return null;
        }

        public void PushAppSupportInfoScene()
        {
        }
    }
}
